package com.hzx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzx.Activity;
import com.hzx.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ActivityMapper extends BaseMapper<Activity> {

    @Select("select * from activity where a_id = #{aId}")
    Activity searchActivity(int aId);

    @Select("select * from activity where num>0")
    List<Activity> searchAll();

    @Override
    int insert(Activity activity);

}
